package com.info.domain;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.springframework.core.serializer.Serializer;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by sola on 2017/9/23.
 */
@Entity
@Table(name="info")
public class Info implements Serializable{
    @Id
    private String id;
    @Version
    private Long version;
    @Column(name="user_name")
    private String userName;

    public Info() {
    }

    public Info(String id, String userName) {
        this.id = id;
        this.userName = userName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "Info{" +
                "id='" + id + '\'' +
                ", version=" + version +
                ", userName='" + userName + '\'' +
                '}';
    }
}
